package net.bolue.console.action;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.bolue.sysmng.exception.BolueException;
import net.bolue.sysmng.model.MvcResModel;
import net.bolue.sysmng.tblbean.MvcAction;
import net.bolue.web.mvc.AbstractAction;
import net.bolue.web.mvc.ActionResult;

/**
 * 获得mvc页面
 * @author Administrator
 *
 */
public class ActionPage extends AbstractAction{

	@Override
	public ActionResult perform(HttpServletRequest request,
			HttpServletResponse response) throws BolueException {
		String str2 = request.getParameter("mvcAction");
		MvcResModel mvcResModel = new MvcResModel(request);
		MvcAction mvcAction = mvcResModel.findMvcAction(str2);
		ActionResult actionResult = new ActionResult();
		Map<String,Object> pageMap = new HashMap<String,Object>();
		pageMap.put("page", mvcAction.getUrlPath());
		pageMap.put("type", mvcAction.getActionType());
		actionResult.setData(pageMap);
		actionResult.setResult(true);
		return actionResult;
	}

}
